package com.skyme.automation.generate.popup.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;

import com.skyme.automation.generate.wizard.bpm.BpmWizard;

/**
 * 添加bmp框架
 * 
 * @author zhangfeng
 * 
 */
public class AddBpmAction implements IObjectActionDelegate {

	private Shell shell;

	public AddBpmAction() {
		super();
	}

	@Override
	public void run(IAction action) {
		BpmWizard wizard = new BpmWizard();
		WizardDialog dialog = new WizardDialog(shell, wizard);
		dialog.open();
	}

	@Override
	public void selectionChanged(IAction action, ISelection selection) {

	}

	@Override
	public void setActivePart(IAction action, IWorkbenchPart targetPart) {
		shell = targetPart.getSite().getShell();
	}

}
